home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / ShutDown.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  2.3 KB  |  90 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ShutDown.a
  3. ;
  4. ;    Contains:    Shutdown Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1987-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__SHUTDOWN__') = 'UNDEFINED' THEN
  19. __SHUTDOWN__ SET 1
  20.  
  21.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  22.     include 'MacTypes.a'
  23.     ENDIF
  24.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  25.     include 'MixedMode.a'
  26.     ENDIF
  27.  
  28.  
  29. sdOnPowerOff                    EQU        1                    ;call procedure before power off.
  30. sdOnRestart                        EQU        2                    ;call procedure before restart.
  31. sdOnUnmount                        EQU        4                    ;call procedure before unmounting.
  32. sdOnDrivers                        EQU        8                    ;call procedure before closing drivers.
  33. sdOnBootVolUnmount                EQU        16                    ;call procedure before unmounting boot volume and VM volume but after unmounting all other volumes
  34. sdRestartOrPower                EQU        3                    ;call before either power off or restart.
  35. ;
  36. ; pascal void ShutDwnPower(void )
  37. ;
  38.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  39.         Macro
  40.         _ShutDwnPower
  41.             move.w              #$0001,-(sp)
  42.             dc.w                $A895
  43.         EndM
  44.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  45.         IMPORT_CFM_FUNCTION ShutDwnPower
  46.     ENDIF
  47.  
  48. ;
  49. ; pascal void ShutDwnStart(void )
  50. ;
  51.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  52.         Macro
  53.         _ShutDwnStart
  54.             move.w              #$0002,-(sp)
  55.             dc.w                $A895
  56.         EndM
  57.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  58.         IMPORT_CFM_FUNCTION ShutDwnStart
  59.     ENDIF
  60.  
  61. ;
  62. ; pascal void ShutDwnInstall(ShutDwnUPP shutDownProc, short flags)
  63. ;
  64.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  65.         Macro
  66.         _ShutDwnInstall
  67.             move.w              #$0003,-(sp)
  68.             dc.w                $A895
  69.         EndM
  70.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  71.         IMPORT_CFM_FUNCTION ShutDwnInstall
  72.     ENDIF
  73.  
  74. ;
  75. ; pascal void ShutDwnRemove(ShutDwnUPP shutDownProc)
  76. ;
  77.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  78.         Macro
  79.         _ShutDwnRemove
  80.             move.w              #$0004,-(sp)
  81.             dc.w                $A895
  82.         EndM
  83.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  84.         IMPORT_CFM_FUNCTION ShutDwnRemove
  85.     ENDIF
  86.  
  87.  
  88.     ENDIF ; __SHUTDOWN__ 
  89.  
  90.